#ifndef VISUAL_H
#define VISUAL_H

#include <surface.h>

void
visual_quit( void );

int
visual_init( uint16_t w, uint16_t h );

int
visual_update( void );

int
visual_waitkey( void );

int
visual_clear( void );

int
visual_fill( color_t color, rect_t rect );

int
visual_display( surface_t *surface, coord_t pos );

int
visual_save( const char *filename );


struct visual_ops
{
  void     (*quit)       ( void );
  int      (*init)       ( uint16_t w, uint16_t h );
  int      (*update)     ( void );
  int      (*waitkey)    ( void );
  int      (*clear)      ( void );
  int      (*fill)       ( color_t color, rect_t rect );
  int      (*display)    ( surface_t *surface, coord_t pos );
  int      (*save)       ( const char *filename );
};

void
visual_change_layer( const struct visual_ops *layer_ops );

#endif /* VISUAL_H */
